
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        // put your code here
            $firstName = $_POST["firstName"];
            $lastName = $_POST["lastName"];
            $email = $_POST["email"];
            $password = $_POST["password"];
            
            $homePhone = $_POST["homePhone1"].$_POST["homePhone2"].$_POST["homePhone3"];
            $cellPhone = $_POST["cellPhone1"].$_POST["cellPhone2"].$_POST["cellPhone3"];
            
            $street = $_POST["street"];
            $city = $_POST["city"];
            $state = $_POST["state"];
            $zip = $_POST["zip"];
            
            $con = mysql_connect("localhost", "zhouzhao", "19831022");
            
            if(!$con){
                die("could not connect to DB: ".mysql_error());
            }
            
            mysql_select_db("cloudcom", $con);
            
            mysql_query("insert into customers values (null, '$firstName', '$lastName', '$email', '$password', '$homePhone', '$cellPhone', '$street', '$city', '$state', '$zip')");
            
            mysql_close($con);
            
            require 'customerLogin.html';
        ?>
    </body>
</html>
